#include<stdio.h>
void main()
{
	float mu = 1;
	float sum = 0;
	int flag = 1;

	while(1/mu >= 0.0001)
	{
		sum = sum + flag/mu;
		mu = mu + 2;
		flag = -flag;
	}
	printf("pi = %f",sum*4);
}